<?php
class PlusAction extends MobilePlusAction {
    public $group, $ac, $mod;
	public function _initialize() {
		$this->plusid = $_GET['plusid'];
		$this->initPlus($this->plusid);
        $this->ac = ACTION_NAME;
        $this->mod = $this->getActionName();
        $this->group = GROUP_NAME;
	}
	public function index()
	{
		$code = $this->plus['code'];
        $PlusAc = A('Plus/'.ucfirst($code));
      	$this->assign('plusid', $this->plus['id']);
      	$this->assign('id', I('id'));
        if (method_exists($PlusAc, 'indexMobile')) {
            $PlusAc->indexMobile();
        	$this->display('./Lib/Action/Plus/'.ucfirst($code).'/Mobile/index.html');
        }
	}

	public function insert()
	{
		$code = $this->plus['code'];
        $PlusAc = A('Plus/'.ucfirst($code));
        $PlusAc->plus = $this->plus;
        if (method_exists($PlusAc, 'insertMobile')) {
            $PlusAc->insertMobile();
        }
        $this->success('操作完成');
	}

    public function _empty(){
        $code = $this->plus['code'];
        $PlusAc = A('Plus/'.ucfirst($code));
        $PlusAc->plus = $this->plus;
        if (method_exists($PlusAc, $this->ac)) {
            R('Plus/'.ucfirst($code).'/'.$this->ac);
            $this->display('./Lib/Action/Plus/'.ucfirst($code).'/Mobile/'.$this->ac.'.html');
        }
    }
}